﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PJ.Business.Partner;
using PJ.Business.Inventory;
using System.Collections.ObjectModel;
using PJ.Data.SalePurchase;

namespace PJ.Business.SalePurchase
{
    public abstract class Invoice<OD> : EntityFragment<OD>, IInvoice
        where OD : IInvoiceData
    {
        public Invoice(OD data)
            : base(data)
        {
        }
        public Invoice()
        {
        }

        public string Id
        {
            get
            {

                return ObjectData.Id;
            }
            set
            {
                if (ObjectData.Id != value)
                {
                    ObjectData.Id = value;
                }
            }
        }


        public string PartnerId
        {
            get
            {
                return OwnerId;
            }
            set
            {
                if (value != OwnerId)
                {
                    OwnerId = value;
                }
            }
        }


        public string Reference
        {
            get
            {

                return ObjectData.Reference;
            }
            set
            {
                if (ObjectData.Reference != value)
                {
                    ObjectData.Reference = value;
                }
            }
        }

    }
}
